package xin.petstore.framework.json;

import xin.petstore.framework.orm.mybatis.paginator.domain.PageList;
import xin.petstore.framework.orm.mybatis.paginator.jackson2.PageListJsonSerializer;
import com.fasterxml.jackson.core.Version;
import com.fasterxml.jackson.databind.module.SimpleModule;

public class ObjectMapper extends com.fasterxml.jackson.databind.ObjectMapper {
    private static final long serialVersionUID = 1L;

    public ObjectMapper() {
        SimpleModule module = new SimpleModule("PageListJSONModule", new Version(1, 0, 0, null, null, null));
        module.addSerializer(PageList.class, new PageListJsonSerializer(this));
        registerModule(module);
    }
}

